package com.yoyo.itravel.service;

import com.yoyo.itravel.bean.City;
import com.yoyo.itravel.bean.PageBean;
import com.yoyo.itravel.exceptions.CityException;

import java.util.List;

/**
 * @Description 城市相关操作服务层接口
 *
 * @author HZX
 * @date 2020/5/13 1:19
 */
public interface ICityService {

    /**
     * @Description 新增城市
     *
     * @param city
     * @return boolean
     */
    boolean addCity(City city) throws CityException;

    /**
     * @Description 查找所有的城市
     *
     * @param
     * @return java.util.List<cn.hut.travel.bean.SightTheme>
     */
    List<City> findAllCity() throws CityException;

    /**
     * @Description 分页查询城市
     *
     * @Param
     * @Return java.util.List<com.yoyo.itravel.bean.City>
     */
    List<City> findCityByPage(PageBean page) throws CityException;

    /**
     * @Description 通过省份id查找该省份下的所有城市
     *
     * @param provinceId
     * @return java.util.List<cn.hut.travel.bean.SightTheme>
     */
    List<City> findCityByProvinceId(String provinceId) throws CityException;

    /**
     * @Description 通过城市名称查找城市
     *
     * @param city
     * @return cn.hut.travel.bean.City
     */
    City findByName(String city) throws CityException;

    /**
     * @Description 查询城市总数量
     *
     * @Param
     * @Return java.lang.Integer
     */
    Integer totalCount() throws CityException;
}
